package com.atguigu;

import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.sql.SQLException;

@SpringBootApplication
public class Day13SpringthreeApplication {

    public static void main(String[] args) throws SQLException {
        ConfigurableApplicationContext ioc = SpringApplication.run(Day13SpringthreeApplication.class, args);
        DruidDataSource bean = ioc.getBean(DruidDataSource.class);
        DruidPooledConnection connection = bean.getConnection();
        System.out.println("输出结果"+connection);

    }

}
